#!/bin/sh

uci -q batch <<-EOF >/dev/null
  delete ucitrack.@v2raypro[-1]
	add ucitrack v2raypro
	set ucitrack.@v2raypro[-1].init=v2raypro
	commit ucitrack
	delete firewall.v2raypro
	set firewall.v2raypro=include
	set firewall.v2raypro.type=script
	set firewall.v2raypro.path=/etc/v2raypro.include
	set firewall.v2raypro.reload=1
	commit firewall
EOF

/etc/init.d/v2raypro stop
/etc/init.d/v2raypro enable

rm -f /tmp/luci-indexcache
exit 0
